﻿@namespace MudBlazor
@using MudBlazor.Utilities
@using MudBlazor.Extensions 
@inherits MudComponentBase

<hr @attributes="UserAttributes" class="@Classname" style="@Style"/>

@code {

    protected string Classname =>
    new CssBuilder("mud-divider")
      .AddClass($"mud-divider-absolute" , Absolute)
      .AddClass($"mud-divider-flexitem", FlexItem)
      .AddClass($"mud-divider-light", Light)
      .AddClass($"mud-divider-vertical", Vertical)
      .AddClass($"mud-divider-{DividerType.ToDescriptionString()}", when: () => DividerType != DividerType.FullWidth)
      .AddClass(Class)
    .Build();

    /// <summary>
    /// Sets absolute postion to the component.
    /// </summary>
    [Parameter] public bool Absolute { get; set; }

    /// <summary>
    /// If true, a vertical divider will have the correct height when used in flex container.
    /// </summary>
    [Parameter] public bool FlexItem { get; set; }

    /// <summary>
    /// If true, the divider will have a lighter color.
    /// </summary>
    [Parameter] public bool Light { get; set; }

    /// <summary>
    /// If true, the divider is displayed vertically.
    /// </summary>
    [Parameter] public bool Vertical { get; set; }

    /// <summary>
    /// The Divider type to use.
    /// </summary>
    [Parameter] public DividerType DividerType { get; set; } = DividerType.FullWidth;

}